import React from 'react'
import {BrowserRouter, Route,Switch} from 'react-router-dom'
import SubBox from './right/sub'
import Sub1Box from './right/sub1'
function Sub1(){
  return <div>
    <SubBox/>
  </div>
}
function Sub(){
  return <div>
    <Sub1Box/>
  </div>
}
class RigthBox extends React.Component

{
  constructor(props){
    super(props)
  }
  render () {
    return (
      <div>
            <Switch>
              <Route path='/' exact={true} render={()=>{return <Sub/>}}/>
              <Route path='/sub1' exact={false} render={()=>{return <Sub1/>}}/>
            </Switch>
      </div>
    )
  }
}

export default RigthBox;